]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Add bottom emoji panel row to separate aspect container
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 5 Mar 2019 18:34:23 +0000 (19:34 +0100)
committerCarlos Garnacho <mrgarnacho@gmail.com>
Tue, 5 Mar 2019 21:11:47 +0000 (21:11 +0000)
So we ensure the row has the right aspect ratio, and buttons neatly aligned
with the bottom row in the alphanumeric view.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/439

js/ui/keyboard.js

index 124831d6ae778db52bd2b78eaddd986e6cf92dda..8dc1b306f3711e713c8645eb0af37a2e5bda2dca 100644 (file)
@@ -881,7 +881,7 @@ var EmojiSelection = class EmojiSelection {
         this._pageIndicator.setReactive(false);
 
         let bottomRow = this._createBottomRow();
-        this.actor.add(bottomRow, { x_fill: true, y_fill: false });
+        this.actor.add(bottomRow, { expand: true, x_fill: false, y_fill: false });
 
         this._emojiPager.setCurrentPage(0);
     }
@@ -970,7 +970,16 @@ var EmojiSelection = class EmojiSelection {
         row.appendKey(key.actor);
         row.layoutButtons();
 
-        return row;
+        let actor = new AspectContainer({ layout_manager: new Clutter.BinLayout(),
+                                          x_expand: true, y_expand: true });
+        actor.add_child(row);
+        /* Regular keyboard layouts are 11.5×4 grids, optimize for that
+         * at the moment. Ideally this should be as wide as the current
+         * keymap.
+         */
+        actor.setRatio(11.5, 1);
+
+        return actor;
     }
 };
 Signals.addSignalMethods(EmojiSelection.prototype);